﻿using System;
using System.Collections.Generic;

namespace Allegro.Mathlib
{
    public interface IProbabilityDistribution
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="x"></param>
        /// <returns></returns>
        double Density(double x);

        /// <summary>
        /// Accumulated probability of distribution variable x
        /// </summary>
        /// <param name="x"></param>
        /// <returns></returns>
        double Probability(double x);

        /// <summary>
        /// Inverse probability
        /// </summary>
        /// <param name="p"></param>
        /// <returns></returns>
        double Inverse(double p);

        /// <summary>
        /// Transform from a sample drawn from the standard distribution to this distribution
        /// </summary>
        /// <param name="x"></param>
        /// <returns></returns>
        double FromStandardValue(double x);

        /// <summary>
        /// Transform from a sample drawn from this distribution to the standard distribution
        /// </summary>
        /// <param name="x"></param>
        /// <returns></returns>
        double ToStandardValue(double x);
    }
}
